#ifndef IMAGE_H
#define IMAGE_H

#include "Config/Export.h"
#include "Core/IDrawable.h"
#include "Core/Texture.h"
#include "Core/IRenderBox.h"

namespace blue {

class SHARED Image : public IDrawable
{
    public:

  Image(Texture *texture, int posX = 0, int posY = 0, IRenderBox *rdrbox = NULL);
  Image(const char *filename, int posX = 0, int posY = 0, IRenderBox *rdrbox = NULL);
        ~Image();

        void load(const char *filename);

        void setPosition(int posX = 0, int posY = 0);
        void setSize(int width, int height);

        const Vector2i &getSize() const;
        const Vector2i &getPosition() const;

        virtual void draw();

    private:

        void create();
        void update();

        Image(Image&);
        const Image &operator=(Image&);

        Texture *_texture;
        Vector2i _size, _pos;
        float _tex_pos[8], _img_pos[8];

	IRenderBox *rdrbox;

};

}

#endif
